.TH std::error_condition::operator= 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::error_condition::operator= \- std::error_condition::operator=

.SH Synopsis
   template< class ErrorConditionEnum >
   error_condition& operator=( ErrorConditionEnum e )         \fB(1)\fP \fI(since C++11)\fP
   noexcept;
   error_condition& operator=( const error_condition& other ) \fB(2)\fP \fI(since C++11)\fP
   = default;                                                     (implicitly declared)
   error_condition& operator=( error_condition&& other ) =    \fB(3)\fP \fI(since C++11)\fP
   default;                                                       (implicitly declared)

   Assigns contents to an error condition.

   1) Assigns error condition for enum e. Effectively calls make_error_condition that
   is only found by argument-dependent lookup for e and then replaces *this with the
   result. This overload participates in overload resolution only if
   std::is_error_condition_enum<ErrorConditionEnum>::value is true.
   2,3) Implicitly defined copy-assignment operator and move-assignment operator assign
   the contents of other to *this.

.SH Parameters

   e     - error condition enum
   other - another error condition to assign with

.SH Return value

   *this.

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

      DR    Applied to            Behavior as published              Correct behavior
   LWG 3629 C++11      only std::make_error_condition overloads     ADL-found overloads
                       were used                                    are used
